<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="footer.css" />
		<link rel="stylesheet" href="../../css/lystyle.css" />
		<style type="text/css">
			/*修改底部字体颜色*/
			
			.foot:nth-child(2) {
				color: #e83023;
			}
			
			table>thead>tr>td,
			table>tbody>tr>td {
				text-align: center;
			}
			
			table>thead>tr>td {
				font-weight: bold;
			}
			
			.lineVertical {
				display: inline-block;
				width: 1px;
				height: 10px;
				background: #EDEDED;
			}
			
			.row .ly-nav-active {
				color: red;
			}
		</style>
		<script src="../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../images/12.png" /></a>
					<p id="headTitle">感恩机制</p>
				</div>
				<div id="content">
					<div class="ly-person-li" style="background-color: white; margin: 10px 1px 0 1px; ">
						<a>
							<p style="line-height: 1.319444rem;text-align: center;color: #e83023;font-size: 16px;" id="gan">感恩号:</p>
						</a>
					</div>

				</div>
				<!--head-->
				<div id="ly-nav" class="row" style="background-color: #FFFFFF;border-top: 1px solid #EDEDED;margin-bottom: 0.027777rem;">
					<a id="orderAll" class="ly-nav ly-nav-active col-xs-12 col-sm-12" style="background-color: #FFFFFF;">
						<p class="ly-font14" style="margin: 0;">一级粉丝</p>
					</a>

				</div>

				<!--表单-->
				<div style="padding: 0rem 0.33rem;background-color: #FFFFFF;" class="table-responsive">
					<table class="table  table-condensed">
						<thead>
							<tr>
								<td>
									用户名
								</td>
								<td></td>
								<td>
									联系方式
								</td>
								<td></td>
								<td>
									积分
								</td>
							</tr>
						</thead>
						<tbody id="tb">
							<!--<tr>
									<td>张丽婷</td>
									<td>
										<div class="lineVertical"></div>
									</td>
									<td>134456</td>
									<td>
										<div class="lineVertical"></div>
									</td>
									<td>18786787654</td>
								</tr>-->

						</tbody>

					</table>

				</div>
			</div>
		</div>
	</body>
	<script src="../../js/jquery-2.2.3.min.js"></script>
	<script src="../../js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var tokenReztApp = $.cookie("tokenReztApp");
		//用户信息
		var user,userId, role, goodsId;
		
		if(!tokenReztApp) {
			window.location.href = "../login/login/login.html";
		}
		$(function() {
			//currentyf();
		});		
		
		//获取当前会员信息		
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://47.104.13.109/member-service/auth/current?token=" + tokenReztApp,
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					$.removeCookie('tokenReztApp', {
						expires: 7,
						path: '/'
					});
					$.removeCookie("tokenRh", {
						expires: 7,
						path: '/'
					});
					$.removeCookie('memberId', {
						expires: 7,
						path: '/'
					});
					$.removeCookie('roleId', {
						expires: 7,
						path: '/'
					});
					window.location.href = "../login/login/login.html";
				},
				success: function(data) {
					//console.log(data);
					userId = data.id;
					user = data.loginName;
					role = data.roleList[0].id; //角色
					goodsId = data.id;
				}
			});
		
		
		$(".ly-nav").click(function() {
			$('.ly-nav').removeClass('ly-nav-active');
			$(this).addClass('ly-nav-active');
		});
		$.ajax({
			type: "get",
			url: "http://47.104.13.109/member-service/member/mine/member?token=" + $.cookie("tokenRh"),
			async: false,
			success: function(res) {
				//console.log(res);
				thankNum = res.tel;
				if(thankNum == null) {
					thankNum = '无';
				}
				$("#gan").text('感恩号:' + thankNum);
			},
			error: function(res) {
				console.log(res);
			}
		});
		$.ajax({
			type: "get",
			url: "http://47.104.13.109/member-service/member/admin/member/memberIT?token=" + $.cookie("tokenRh"),
			async: false,
			success: function(res) {
				//console.log(res);
				var str = "";
				for (var i = 0;i < res.length;i++) {
					var num;
					$.ajax({
						type: "get",
						url: "http://47.104.13.109/integral-service/tfIntegralDetailNum?memberId=" + userId+"&otherMemberId="+res[i].id,
						async: false,
						success: function(data) {
							num = data;
						},
						error: function(data) {
							console.log(data);
						}
					});	
					str += '<tr><td>'+res[i].loginName+'</td><td></td><td>'+res[i].tel+'</td><td></td><td>'+num+'</td></tr>';
				}
				
				$("#tb").append(str);
			},
			error: function(res) {
				console.log(res);
			}
		});
	</script>

</html>